package com.iemes.controller.warehouse;

import java.util.List;
import java.util.Map;

import javax.inject.Inject;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.iemes.controller.index.BaseController;
import com.iemes.entity.ProductreturnFormMap;
import com.iemes.mapper.warehouse.ProductreturnMapper;
import com.iemes.plugin.PageView;
import com.iemes.util.Common;

@RequestMapping("/returnproduct_form/")
@Controller
public class ReturnproductController extends BaseController {

	@Inject
	private ProductreturnMapper productreturnMapper;
	
	// 查看产品退货处理情况表，显示按钮。
	@RequestMapping("returnproduct_all")
	public String returnproduct_form(Model model) {
		model.addAttribute("res", findByRes());
		return Common.BACKGROUND_PATH + "/warehouse/returnproduct_form_list";
	}

	// 产品退货处理情况表分页
	@ResponseBody
	@RequestMapping("returnproduct_form_findByPage")
	public PageView findByPage(String pageNow, String pageSize) throws Exception {
		ProductreturnFormMap productreturnFormMap=getFormMap(ProductreturnFormMap.class);
		List<Map<String, Object>> productreturn=productreturnMapper.getAllBy1(productreturnFormMap);
		LuogicPaging(pageNow, pageSize, productreturn);
		return pageView;
	}
}








